package com.whut.gkd.service.impl;

import com.whut.gkd.bean.ShopInfo;
import com.whut.gkd.dao.IGoodDao;
import com.whut.gkd.dao.IShopDao;
import com.whut.gkd.dao.IUserDao;
import com.whut.gkd.service.IShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShopServiceImpl implements IShopService {

    @Autowired
    private IShopDao shopDao;

    @Override
    public ShopInfo findShopinfoByUserId(int id) {
        return shopDao.findShopinfoByUserId(id);
    }

    @Override
    public void update(ShopInfo info) {
        shopDao.update(info);
    }

    @Override
    public void closeShop(ShopInfo shopinfo) {
        shopDao.deleteShopinfo(shopinfo);
        shopDao.deleteApplyGood(shopinfo);
    }
}
